package router

import (
	"dev-manage-sys/hander"
	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
	// 1.创建路由
	r := gin.Default()

	r.GET("/list", hander.List)
	r.POST("/login", hander.Login)
	r.POST("/role/create", hander.RoleCreate)
	r.POST("/node/create", hander.NodeCreate)
	r.GET("/user/role", hander.UserRole)
	r.GET("/role/node", hander.RoleNode)
	r.POST("/good/create", hander.GoodCreate)
	r.POST("/orange/create", hander.OrangeCreate)
	r.GET("/orange/list", hander.OrangeList)

	return r
}
